import time
from public.action import *
from public.business import *
from public.testData import *
from public.tools import*


testCase = "DBshop007_查看发货单"


# 登录后台管理系统,地址是"http://localhost/dbshop/admin"
firefox=openBrowser(urlAdmin)
#调用自定义函数进行后台的登录
DBshopLoginAdmin(firefox)
#调用后台的菜单操作函数
DBshopEnterMenu2(firefox,'销售管理','发货单')
time.sleep(2)
firefox.find_elements_by_link_text("查看")[0].click()
# 断言
a=firefox.find_element_by_xpath('//table/tbody/tr[3]/td[3]').text
try:
    if "已发货"==a or "未发货"==a:
        writeLog("%s 测试通过" % testCase)
except:
    writeLog("%s 测试不通过" % testCase)
    getPhoto(firefox)

firefox.quit()
